<script type="text/template" id="xblock-grade-template">
  <div class="grade-result">
    <h4>
      <%= _.template(gettext("You scored {percent}% on this assessment."), {percent: score}, {interpolate: /\{(.+?)\}/g}) %>
    </h4>
    <hr/>

    <span class="assessment-checkmark icon-2x checkmark-correct icon-ok fa fa-check"></span>
    <div class="results-section">
      <p>
        <%= _.template(
          ngettext(
            "You answered 1 question correctly.",
            "You answered {number_correct} questions correctly.",
            correct_answer
          ), {number_correct: correct_answer}, {interpolate: /\{(.+?)\}/g})
        %>
      </p>
      <%= runDetails('correct') %>
    </div>
    <div class="clear"></div>
    <span class="assessment-checkmark icon-2x checkmark-partially-correct icon-ok fa fa-check"></span>
    <div class="results-section">
      <p>
        <%= _.template(
          ngettext(
            "You answered 1 question partially correctly.",
            "You answered {number_partially_correct} questions partially correctly.",
            partially_correct_answer
          ), {number_partially_correct: partially_correct_answer}, {interpolate: /\{(.+?)\}/g})
        %>
      </p>
      <%= runDetails('partial') %>
    </div>
    <div class="clear"></div>
    <span class="assessment-checkmark icon-2x checkmark-incorrect icon-exclamation fa fa-exclamation"></span>
    <div class="results-section">
      <p>
        <%= _.template(
          ngettext(
            "You answered 1 question incorrectly.",
            "You answered {number_incorrect} questions incorrectly.",
            incorrect_answer
          ), {number_incorrect: incorrect_answer}, {interpolate: /\{(.+?)\}/g})
        %>
      </p>
      <%= runDetails('incorrect') %>
    </div>
    <div class="clear"></div>
    <hr/>
  </div>
</script>

<!-- Template for extended feedback: Show extended feedback details when all attempts are used up. -->
<script type="text/template" id="xblock-review-questions-template">
<% var q, last_question; %>
<ul class="review-list <%= label %>-list">
    <% for (var question in questions) {{ q = questions[question]; last_question = question == questions.length - 1; %>
    <li><a href="#" class="question-link" data-step="<%= q.number %>"><%= _.template(gettext("Question {number}"), {number: q.number}, {interpolate: /\{(.+?)\}/g}) %></a></li>
    <% }} %>
</ul>
</script>

<!-- Tips about specific questions the student got wrong. From pb-message[type=on-assessment-review-question] blocks -->
<script type="text/template" id="xblock-review-tips-template">
<p class="review-tips-intro"><%= gettext("You might consider reviewing the following items before your next assessment attempt:") %></p>
<ul class="review-tips-list">
    <% for (var tip_idx in tips) {{ %>
        <li><%= tips[tip_idx] %></li>
    <% }} %>
</ul>
</script>

